import request from '@/utils/request'

// 查询仓库信息列表
export function listWareHouse(query) {
  return request({
    url: '/warehouse/list',
    method: 'get',
    params: query
  })
}

// 停车位状态修改
export function changeParkingStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/basic/parking/changeStatus',
    method: 'put',
    data: data
  })
}

// 查询停车位信息表列表
export function listParking(query) {
  return request({
    url: '/basic/parking/list',
    method: 'get',
    params: query
  })
}

// 查询停车位信息表详细
export function getParking(id) {
  return request({
    url: '/basic/parking/' + id,
    method: 'get'
  })
}

// 新增停车位信息表
export function addParking(data) {
  return request({
    url: '/basic/parking',
    method: 'post',
    data: data
  })
}

// 修改停车位信息表
export function updateParking(data) {
  return request({
    url: '/basic/parking',
    method: 'put',
    data: data
  })
}

// 删除停车位信息表
export function delParking(id) {
  return request({
    url: '/basic/parking/' + id,
    method: 'delete'
  })
}
